package com.example.tool.adapter;

import android.content.Context;
import android.graphics.Typeface;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.example.tool.R;
import com.example.tool.util.DebugLog;

import java.util.List;

/**
 * 描述:字体适配
 *
 * @author: liangkun
 * @date: 2019/10/22 10:46
 */
public class CommonTextAdapter extends BaseQuickAdapter<String, BaseViewHolder> {
    private List<String> data;
    private Context context;

    public CommonTextAdapter(int layoutResId, @Nullable List<String> data, Context context) {
        super(layoutResId, data);
        this.data = data;
        this.context = context;
    }

    @Override
    protected void convert(@NonNull BaseViewHolder helper, String item) {

        helper.setText(R.id.tv_home_item, item).addOnClickListener(R.id.tv_home_item).linkify(R.id.tv_home_item);
    }
}
